import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import Components from 'unplugin-vue-components/vite';

// https://vitejs.dev/config/
export default defineConfig({
    plugins: [
        vue(), Components()
    ],
    server: {
        proxy: {
            '^/kaptcha.*': 'http://localhost:8080/BookCity_Vue_SSM/kaptcha',
            '/user/login': {
                target: 'http://localhost:8080/BookCity_Vue_SSM/user/login',
                changeOrigin: true,
            },
            '/upload': 'http://localhost:8080/BookCity_Vue_SSM/upload'
        }
    }
});
